<ion-view view-title="世纪汇 - 首页" hide-tabs="false"  id="home">
  <!-- 头部 -->
  <ion-header-bar align-title="center" class="bar-positive">
    <h1 class="title">
      世纪汇 
    </h1>
   <a ng-click="go_wifi()"
      class="button right"
      style="color:#a68a4b; font-size:13px;line-height:33px;float:right;right:0;background:transparent;border:none;"
      >
      快速上网
    </a>
   
  </ion-header-bar>
  <ion-content [scroll="true"] [overflow-scroll="true"]>
    <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher>
   
    <div id="login_box" ng-if="no_login" style="text-align:center;"><!--在用户未登录的状态下显示-->
      <a class="button button-small" ng-click="modal.show()" >
        <img ng-src="img/tabs_icons/mine_1.png" alt="icon">
        登录/注册
      </a>
    </div>
    <!--在用户登录后显示相关信息个人信息-->
    <div id="login_ed" ng-hide="no_user_infos">
      <div id = "user_info">
        <div class="list">
          <div class="item item-avatar"  style="padding-bottom:12px;">
            <img ng-src="{{imgSrc}}" style="top:18px; width:60px;">
            <h2 style="line-height:17px;">
              {{phone}}
              <span class="member">{{card_grade}}</span>
            </h2>
            <p class="integral" ui-sref="tab.h_integral">
              	积分：
              <span>{{integral}}</span>
            </p>
            <span class = "qr"  ui-sref="tab.QR({id:card_num})">
              <img ng-src="img/icons/icon_QR.png" alt="二维码" class="img_QR">
              <span> 会员二维码</span>
            </span> 
          </div>
        </div>
      </div>
    </div>

    <div>{{id}}</div>
    <!-- 优惠券 -->
    <div id="swiper" ng-hide="no_user_infos">
	    <div class="swiper-container">
		    <div class="swiper-wrapper" >
			    <div class="swiper-slide"  ng-repeat="x in show_items">
			    	<img ng-src="{{x.imageUrl}}" class="logo" />
			    	<p class="name">
			    		<!--代金券-->
			    		{{x.couponInfo}}
			    	</p>
			    	<p class="market_pay">
			    		<!--100元代金券-->
			    		{{x.couponName}}
			    	</p>
			    	<p class="time"style=" border-top: 1px dashed #BDBDBD;">
			    		有效日期：{{x.endTime | shijian}} 
			    		<span class="right" ng-click = 'go_vipCoupon_del(x.couponType,x.id)'>
			    			详情
			    		</span>
			    	</p>
			    </div>
	    	</div>
	  	</div>
  	</div>
	  
    <!-- 优惠券 -->

    <!-- 导航轮播  ui-sref="tab.active_detail({active_id:x.act_id})" ng-click="go_shop_detail(x.act_id)" -->
    <ion-slide-box  does-continue = "true" auto-play = "true" slide-interval="1500"  delegate-handle="slideboximgs">
       <ion-slide  ng-repeat="x in items" >
        <div ui-sref="tab.active_detail({active_id:x.act_id})" style="width:100%;">
          <img ng-src="{{IP + x.act_pic}}"  style="width:100%;">  
        </div>
      </ion-slide>  
    </ion-slide-box> 
    <!-- 导航轮播   -->

   <!-- 停车场 -->
    <div class="bus_stop row"style="margin:0;">
      <div class="License col-60">
        <div ng-if="no_login" style="text-align:center;"><!--未登录-->
          <a class="add_license" style="font-size: 13px;">
            登录后享智能停车
          </a>
        </div>
        <div ng-hide="no_user_infos" ui-sref='tab.myplate'><!--登录后如果有车牌就显示第一个车牌-->
          <div class="bg" ng-class="{'bg':'true','outpark':isoutpark}">
            <div class="w_bor">
              {{show_plate}}
            </div>
          </div>
          <span ng-if="false">已入场</span>
          <span style="color:#757575;float:right;line-height:30px;">{{car_num | platenumber}}</span>
        </div>
        <div ng-if="false" style="text-align:center;"><!--登录后没有车牌 点击添加车牌-->
          <a class="add_license" ui-sref="tab.myplate">
            添加车牌
          </a>
        </div>
      </div>
      <div class="Parking col-40" >
        <div><span class="p_img">P</span> 空余车位</div>
        <p class="parking_num">{{parking_space}}<small>个</small></p>
      </div>
    </div>
    <!-- 停车场 -->
    
    <!--新店入场   ui-sref="tab.shop_detail({active_id:x.act_id})"   tab.shop_detail ng-click="go_shop_detail(shop.shop_id)"-->
    <div class="padding shoplist">
      <p class="title">新店入场
        <a ng-click="get_more()" style="float:right;">查看全部</a><!--进入商铺品牌页面-->
      </p>
      <ul class="lists">
         <li class="shop_item"  ng-repeat="shop in shops_items" ui-sref="tab.shop_detail({shop_id:shop.shop_id})">
          <img ng-src="{{shops_IP+shop.shop_logo}}" >
          <h2>{{ shop.shop_name}}</h2>
          <p style="height:25px;">{{shop.shop_content}}</p>
        </li> 
        <!-- <li class="shop_item">
          <img ng-src="img/pinpai.png" >
          <h2>欧碧泉</h2>
          <p>总部设在巴黎隶属于欧莱总部设在巴黎隶属于欧莱雅集团总部设在巴黎隶属于欧莱雅集团雅集团总部设在巴黎隶属于欧莱雅集团</p>
        </li> -->
      </ul> 
    </div>
    <!--新店入场-->

    <!-- 会员福利与专享  ui-sref="tab.mall"  ng-repeat="coupon in h_coupons"ui-sref = "tab.czjx({id:vip1.goodsId})"-->
    <div class="welfare row" ng-hide="vip_hide">
      <div class="col-50 " ng-click='gogiftdel(vip1.couponInfo.couponType,vip1.goodsId)' >
        <div class="vip">
          <div class="vip_item">
            <img ng-src="{{vip1.imageUrl}}" alt="会员福利">
            <h2>
               会员福利 
            </h2>
            <p>
              {{vip1.couponInfo.couponName}}
              <!-- 80抵100优惠券 -->
            </p>
            <span>
              <!-- 麻辣诱惑 -->
              {{vip1.couponInfo.note}}
            </span>
          </div>
        </div>
      </div>

       <div class="col-50" ng-click='gogiftdel(vip2.couponInfo.couponType,vip2.goodsId)'>
        <div class="vip">
          <div class="vip_item">
            <img ng-src="{{vip2.imageUrl}}" alt="会员专享">
            <h2>会员专享</h2>
            <p>
              {{vip2.couponInfo.couponName}}
              <!-- 旅行装兑换券 -->
            </p>
            <span>
              {{vip2.couponInfo.note}}
              <!-- SKII -->
            </span>
          </div>
        </div>
      </div>  
    </div>
    <!-- 会员福利与专享 -->
    <!-- 超值精选 -->
    <div class="padding ">
      <p class="czjx_title">
        <span class="left"></span>
        <span class="middle">超值精选</span>
        <span class="left"></span>
      </p>
      <div style="overflow: auto; zoom: 1;">
        <div class="unit" ng-repeat="good in goods" style="margin-top:10px;"ng-click='gogiftdel(good.couponInfo.couponType,good.goodsId)' >
          <div class="shop_border" >
            <div style="text-align:center;">
                <img src="{{good.imageUrl}}" alt="商品图片">
            </div>
            <p class="integral_exchange">
              <span>{{good.payPoint | number:0}}</span>积分+<span>{{good.payMoney}}</span>元
            </p>
            <span class="introduce">
              {{good.couponInfo.note}}
            </span>
          </div>
        </div>
      </div> 
      <div style="height: 30px;line-height: 30px;text-align: center;font-size: 10px;color:#E0E0E0;">
      	{{list_notice}}
      </div>
    </div> 
    
    <!--模拟删除车牌-->
    <!--<div style="border:1px solid #333;height:100px;width:100%;">
      <h4>{{car}}</h4>
      <ul ng-repeat="x in cars">
        <li style="font-size:15px;color:red;"ng-click="remove($index)">{{x.num}}</li>
      </ul>
    </div>-->

    <!--登录模块-->
    <script id="templates/modal.html" type="text/ng-template">
      <ion-modal-view id="QR_page">
        <ion-header-bar class="bar bar-header padding">
            <h1 class="title">
            <button class="button button-clear button-primary" ng-click=" modal.hide()">关闭</button>
            {{m_title}}
            </h1>
        </ion-header-bar>
        <ion-content class="padding">
            <!-- 登录模块 -->
            <div id="login" ng-if="display_login">
              <div class="button-bar sub_header_list">
                  <a class="button button-clear" ng-click="changeModel(0)" ng-class="{true:'selected',false:'unselected'}[show_M == 0]">验证码登录</a>
                  <a class="button button-clear" ng-click="changeModel(1)" ng-class="{true:'selected',false:'unselected'}[show_M == 1]">密码登录</a>
              </div>
              <form action="" ng-if="pwd_login_2" ><!--常规登录-->
                  <p class="no_pwd">若忘记密码，请使用验证码登录</p>
                  <div class="login_list">
                    <input type="text" placeholder="输入手机号" ng-class="{'phone':true,'e_act':is_phone}" ng-model="n_user_info.user_num" ng-focus="phone_test()">
                    <span class="notice">{{reg_notice_phone}}</span>
                  </div>
                  <div class="login_list" style="position:relative;">
                    <input id="pwd" type="password" placeholder="请输入密码" ng-class="{'phone':true,'e_act':is_phone}" ng-model="n_user_info.user_pwd" ng-focus="verification_test()">
                    <span class="show" ng-click="show_pwd()">{{show_pwd_value}}</span>
                    <span class="notice" >{{reg_notice_pwd}}
                      <span class="remember_pwd" >
                         <!-- ng-checked="ischecked"  -->
                        <input type="checkbox" hidden  ng-model="ischecked" ng-checked="ischecked" id="mar"/>
                        <label ng-click="toggle_pwd()">记住密码</label>
                      </span>
                    </span>
                  </div>
                  <div class="login_list">
                    <button type="button" id = "login_btn_1" ng-class="{'login_btn_def':true,'login_btn_act':isact}" ng-click = "login_pwd()">登 &nbsp; 录</button>
                    <span class="notice">{{pwd_login_res}}</span>
                  </div>
              </form>

              <form action="" ng-if="test_code_login_2"><!--快捷登录-->
                  <p class="no_pwd"></p>
                  <div class="login_list" style="position:relative;border-color:#A58648">
                       
                      <div class="item item-input item-select" style="width:65px;position:absolute;top:0px;left:0px;padding:0;height:30px;">
                        <!-- 86中国 82韩国  65新加坡 -->
                        <select style="max-width:100%;" id = 'home_DL_area'>
                          <option value = '86'>+86</option>
                          <option value = '82'>+82</option>
                          <option value = '65'>+65</option>
                        </select>
                      </div>

                      <input type="text" style="padding-left:74px;" placeholder="输入手机号" ng-class="{'phone':true,'e_act':is_phone}" ng-model="user_info.user_num" ng-focus="phone_test()">
                    <span class="notice" >{{phone_tc}}</span>
                  </div>
                  <div class="login_list">
                    <input type="text"placeholder="输入验证码" ng-class="{'num':true,'e_act':is_num}"ng-model="user_info.test_code" ng-focus="verification_test()">
                    <a ng-click="get_test_code($event)" ng-bind="captcha.paracont" class="test_btn">发送验证码</a>
                    <span class="notice" >{{test_code_tc}}  </span>
                  </div>
                  <div class="login_list">
                    <button type="button" id = "login_btn" ng-class="{'login_btn_def':true,'login_btn_act':isact}" ng-click = "LOGIN()">登 &nbsp; 录</button>
                  </div>
              </form>
              <p class="change">
                  还不是会员，<span style="color:#A58648;"ng-click="change_page(1)" >马上注册</span>
              </p>
            </div>
            <!-- 注册模块 -->
            <div id="register" ng-if="display_register">
               <form action="" style="margin-top:30px;">
                <div class="login_list" style="position:relative;border-color:#A58648">
                       
                      <div class="item item-input item-select" style="width:65px;position:absolute;top:0px;left:0px;padding:0;height:30px;">
                        <!-- 86中国 82韩国  65新加坡 -->
                        <select style="max-width:100%;" id = 'home_ZC_area'>
                          <option value = '86'>+86</option>
                          <option value = '82'>+82</option>
                          <option value = '65'>+65</option>
                        </select>
                      </div>

                      <input type="text" style="padding-left:74px;" placeholder="输入手机号" ng-class="{'phone':true,'e_act':is_phone}" ng-model="register_info.phone"  ng-focus = "hide_notice()">
                  <span class="notice">{{r_phone_num}}</span>
                </div>
                <div class="login_list" style="position:relative;">
                  <input id="pwd" type="password" placeholder="请输入密码" ng-class="{'phone':true,'e_act':is_phone}" ng-model="register_info.pwd" ng-focus = "hide_notice()">
                  <span class="show" ng-click="show_pwd()">{{show_pwd_value}}</span>
                  <span class="notice" >
                   {{r_pwd_num}}
                  </span>
                </div>
                <div class="login_list">
                  <input type="text"placeholder="输入验证码" ng-class="{'num':true,'e_act':is_num}"ng-model="register_info.code" ng-focus = "hide_notice()" >
                  <a ng-click="register_code($event)" ng-bind="captcha.paracont" class="test_btn">发送验证码</a>
                  <span class="notice" >{{r_pwd_login_res_code}} </span>
                </div>
                <div class="login_list">
                  <button type="button" id = "login_btn_1" ng-class="{'login_btn_def':true,'login_btn_act':isact}" ng-click = "register()">注&nbsp;册</button>
                  <span class="notice" >
                    {{r_pwd_login_res}}
                  </span>
                </div>
              </form>
              <p class="change">
                  已是会员，<span style="color:#A58648;"ng-click="change_page(0)" >马上登录</span>
              </p>
            </div>
          </ion-content>
      </ion-modal-view>
    </script>
    <!--登录模块-->
  </ion-content>
</ion-view>